<template>
  <section class="form-section" :class="customClass">
    <div class="section-header">
      <slot name="header">
        <h2 v-if="title">{{ title }}</h2>
      </slot>
    </div>
    <div class="section-content">
      <slot></slot>
    </div>
  </section>
</template>

<script>
export default {
  name: 'FormSection',
  props: {
    title: String,
    customClass: [String, Object, Array]
  }
}
</script>

<style scoped>
.form-section {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #ebeef5;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #ebeef5;
  padding-bottom: 10px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 500;
  color: #303133;
  margin: 0;
}
</style> 